<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>我的消息</title>
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1" />
<link rel="stylesheet" href="{{ url('/common/mobile-common/common.css') }}">		
<link rel="stylesheet" href="{{ url('/mobile/css/header.css') }}">		
<link rel="stylesheet" href="{{ url('/mobile/css/menu-swip.css') }}">			
<link rel="stylesheet" href="{{ url('/mobile/css/member/news.css') }}">	
<script src="{{ url('mobile/js/jquery-1.8.3.min.js') }}"></script>
<script src="{{ url('mobile/js/touchSwipe/jquery.touchSwipe.min.js') }}"></script>
<script src="{{ url('/common/mobile-common/hmt.js') }}"></script>
</head>
<body>
	<div class="abouts">
		<div class="wrap-cont clearfix">
				<!--头部导航-->
				<div class="top-menu menu-wip">
					<ul class="line clearfix">
						<a href="{{url('wap/member/news?id=0')}}"><li><span @if(($_GET['id'])==0)class="nowsh" @endif>全部</span></li></a>
						@foreach($menu as $v)
							<a href="{{url('wap/member/news?id='.$v['id'])}}"><li><span @if($_GET['id']==$v['id'])class="nowsh" @endif>{{$v['name']}}</span></li></a>
						@endforeach
					</ul>
				</div>
				<!--end-->
				<div class="wrap-cont">
					<div class="news-list">
					<ul>
						@foreach($res as $v)
						<li>
							<a href="{{url('wap/member/newsDetail/'.$v->id)}}" target="_blank">
								<p>
									<span>{{$v->cname}}@if($v->is_view==2)<i></i>@endif</span>
									<em>{{App\Http\Util\TimeHelper::formatDateTime($v->created_at)}}</em>
								</p>
								<p>{{$v->content}}</p>
							</a>
						</li>
						@endforeach
					</ul>
				</div>
				
		</div>
	</div>
	
</body>
<script>
	$(function(){
		//导航切换样式
		$(".top-menu li").on('touchstart',function(){
			$(".top-menu a li span").removeClass("nowsh");
			$(this).find("span").addClass("nowsh");
		});
		
		//导航滑动
		n=$('.line li').size();				
		var wh=100*n+"%";
		$('.line').width(wh);
		var lt=(100/n/5);
		var lt_li=lt+"%";
		$('.line li').width(lt_li);			
		var y=0;
		var w=n/2;						
		$(".line").swipe( {					
			swipeLeft:function() {
				if(y==-lt*w){
					alert('已经到最后页');
				}else{
					y=y-lt;								
					var t=y+"%";									
					$(this).css({'-webkit-transform':"translate("+t+")",'-webkit-transition':'500ms linear'} );	
				}
			},
			swipeRight:function() {
				if(y==0){
					alert('已经到第一页')	
				}else{
					y=y+lt;
					var t=y+"%";
					$(this).css({'-webkit-transform':"translate("+t+")",'-webkit-transition':'500ms linear'} );	
				}
			}
		});
		//点击消息提示消失
		$(".wrap-cont .news-list li").on("touchstart",function(){
			$(this).find("i").hide();
		})
	})
</script>
</html>
